<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Test extends MY_Controller {

	function __construct() {
		parent::__construct();
		//$this->load->model('u_user', 'user_m');
		//$this->load->helper('file');
	}
	
	function test_sql() {
		$con = mysql_connect("localhost", "root", "");
		if (!$con)
		{
			die('Could not connect: ' . mysql_error());
		}
		
		mysql_select_db("jnu_ars", $con);
		
		$sql_str = "SELECT *
    	FROM `f_flight_scheduler`, `f_flight`, `const_airplane_model`, `f_flight_scheduler_price`
		WHERE
		f_flight.flight_scheduler_id = f_flight_scheduler.id
		AND f_flight_scheduler.airplane_model_id = const_airplane_model.id
		AND f_flight_scheduler.from_airport_id = 3
		AND f_flight_scheduler.to_airport_id = 7
		
		AND (
			(f_flight_scheduler.from_airport_id = f_flight_scheduler_price.from_airport_id AND f_flight_scheduler.to_airport_id = f_flight_scheduler_price.to_airport_id)
			OR
			(f_flight_scheduler.from_airport_id = f_flight_scheduler_price.to_airport_id AND f_flight_scheduler.to_airport_id = f_flight_scheduler_price.from_airport_id)
		)
		
		AND f_flight_scheduler.scheduler_date_id = f_flight_scheduler_price.scheduler_date_id
		AND CONCAT_WS(' ', f_flight.departure_date, f_flight_scheduler.departure_time) > NOW()
		AND f_flight.departure_date = '2012-10-20'
		AND f_flight_scheduler.scheduler_date_id = (
		SELECT f_flight_scheduler_date.id
		FROM `f_flight_scheduler_date`
		WHERE
		f_flight_scheduler_date.start_date <= f_flight.departure_date <= f_flight_scheduler_date.end_date
		)";
		
		$result = mysql_query($sql_str);
		
		echo '<pre>';
		print_r(mysql_fetch_array($result, MYSQL_ASSOC));
		return;
		
		while($row = mysql_fetch_array($result))
		{
			echo $row['FirstName'] . " " . $row['LastName'];
			echo "<br />";
		}
		
		mysql_close($con);
	}
	
	function test_model() {
		$this->load->model('u_user', 'user_m');
		$condition['username'] = 'zhangqianxun';
		$condition['password'] = '19910319';
		$condition['category'] = 2;
		$temp = $this->user_m->search_by_condition($condition);
		//$temp = $this->user_m->set_table_name();
		echo "<pre>";
		print_r($temp);
	}
	
	function test_eval() {
		$str = read_file($_SERVER['DOCUMENT_ROOT'] . '/jnu_ars/application/controllers/func_template.tpl');
		echo '<pre>';
		echo $str;
		//echo eval($str);
	}
	
	function test_time() {
		echo date('Y/m/d h:m:s A', 1999999999);//1314670665
	}
	
	function session() {
		echo "<pre>";
		//print_r($this->session->userdata(SESSION_SOCIETY_LOGO_THUMB));
		print_r($_SESSION);
	}
	
	function path() {
		echo base_url();
		echo "<pre>";
		print_r($_SERVER);
		echo "<br />";
		print_r($_COOKIE);
		echo __FILE__;
	}
	
	function json_de() {
		$str = '{"totalResultsCount":8330469,"geonames":[{"countryName":"Iran","adminCode1":"23","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":49.133333,"fcodeName":"mountain","toponymName":"Kūh-e Zardar","fcl":"T","name":"Kūh-e Zardar","fcode":"MT","geonameId":1,"lat":32.983333,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.9166667,"fcodeName":"populated place","toponymName":"Zamīn Sūkhteh","fcl":"P","name":"Zamīn Sūkhteh","fcode":"PPL","geonameId":3,"lat":32.4833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"23","fclName":"stream, lake, ...","countryCode":"IR","lng":49.3667,"fcodeName":"stream","toponymName":"Rūdkhāneh-ye Zākalī","fcl":"H","name":"Rūdkhāneh-ye Zākalī","fcode":"STM","geonameId":4,"lat":32.8455,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.9,"fcodeName":"populated place","toponymName":"Yekāhī","fcl":"P","name":"Yekāhī","fcode":"PPL","geonameId":5,"lat":32.5,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"stream, lake, ...","countryCode":"IR","lng":48.8,"fcodeName":"stream","toponymName":"Āb-e Yasī","fcl":"H","name":"Āb-e Yasī","fcode":"STM","geonameId":6,"lat":32.8,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.2,"fcodeName":"populated place","toponymName":"Tarvīḩ ‘Adāī","fcl":"P","name":"Tarvīḩ ‘Adāī","fcode":"PPL","geonameId":7,"lat":32.1,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.0833333,"fcodeName":"hill","toponymName":"Tappeh-ye Seh Nūr","fcl":"T","name":"Tappeh-ye Seh Nūr","fcode":"HLL","geonameId":8,"lat":32.75,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.6905,"fcodeName":"mountain","toponymName":"Kūh-e Yalmī","fcl":"T","name":"Kūh-e Yalmī","fcode":"MT","geonameId":9,"lat":32.8017,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4,"fcodeName":"populated place","toponymName":"Kabūtarān","fcl":"P","name":"Kabūtarān","fcode":"PPL","geonameId":10,"lat":32.7333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"23","fclName":"stream, lake, ...","countryCode":"IR","lng":48.0666667,"fcodeName":"stream","toponymName":"Takht-e Jān","fcl":"H","name":"Takht-e Jān","fcode":"STM","geonameId":11,"lat":32.9666667,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.8675,"fcodeName":"populated place","toponymName":"Takht-e Qeyşar","fcl":"P","name":"Takht-e Qeyşar","fcode":"PPL","geonameId":12,"lat":32.0591,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.7,"fcodeName":"populated place","toponymName":"Takht Arreh Yek","fcl":"P","name":"Takht Arreh Yek","fcode":"PPL","geonameId":13,"lat":32.8,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.6833333,"fcodeName":"populated place","toponymName":"Takht Arreh Do","fcl":"P","name":"Takht Arreh Do","fcode":"PPL","geonameId":14,"lat":32.8166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4,"fcodeName":"populated place","toponymName":"Tīleh","fcl":"P","name":"Tīleh","fcode":"PPL","geonameId":15,"lat":32.2333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.9833333,"fcodeName":"populated place","toponymName":"Solţān Moḩammad","fcl":"P","name":"Solţān Moḩammad","fcode":"PPL","geonameId":16,"lat":32.35,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"23","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.05,"fcodeName":"mountain","toponymName":"Kūh-e Shotor Khvāb","fcl":"T","name":"Kūh-e Shotor Khvāb","fcode":"MT","geonameId":17,"lat":32.85,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"stream, lake, ...","countryCode":"IR","lng":49.18423,"fcodeName":"stream","toponymName":"Rūdkhāneh-ye Shūr","fcl":"H","name":"Rūdkhāneh-ye Shūr","fcode":"STM","geonameId":18,"lat":32.248415,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"stream, lake, ...","countryCode":"IR","lng":48.8868,"fcodeName":"stream","toponymName":"Rūdkhāneh-ye Shūr","fcl":"H","name":"Rūdkhāneh-ye Shūr","fcode":"STM","geonameId":19,"lat":32.1265,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.066667,"fcodeName":"populated place","toponymName":"Sheykh Sa‘d","fcl":"P","name":"Sheykh Sa‘d","fcode":"PPL","geonameId":20,"lat":32.5,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.5166667,"fcodeName":"populated place","toponymName":"Sheykh Khomāţ","fcl":"P","name":"Sheykh Khomāţ","fcode":"PPL","geonameId":22,"lat":32.0166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.5,"fcodeName":"populated place","toponymName":"Sheykh Şāleḩ Sā‘īd","fcl":"P","name":"Sheykh Şāleḩ Sā‘īd","fcode":"PPL","geonameId":23,"lat":32.033333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.3666667,"fcodeName":"populated place","toponymName":"Sheykh Ḩoseyn","fcl":"P","name":"Sheykh Ḩoseyn","fcode":"PPL","geonameId":24,"lat":32.2,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.433333,"fcodeName":"populated place","toponymName":"Sheykh ‘Alī Aşghar","fcl":"P","name":"Sheykh ‘Alī Aşghar","fcode":"PPL","geonameId":25,"lat":32.05,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.216667,"fcodeName":"populated place","toponymName":"Sheykh ‘Ajam","fcl":"P","name":"Sheykh ‘Ajam","fcode":"PPL","geonameId":26,"lat":32.016667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.3,"fcodeName":"populated place","toponymName":"Sharū-ye ‘Olyā","fcl":"P","name":"Sharū-ye ‘Olyā","fcode":"PPL","geonameId":29,"lat":32.966667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.25,"fcodeName":"populated place","toponymName":"Shāreh Kanī","fcl":"P","name":"Shāreh Kanī","fcode":"PPL","geonameId":30,"lat":32.2166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4833333,"fcodeName":"populated place","toponymName":"Sharaf od Dīn","fcl":"P","name":"Sharaf od Dīn","fcode":"PPL","geonameId":31,"lat":32.6166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.6833333,"fcodeName":"populated place","toponymName":"Shahīdān-e Zeyd","fcl":"P","name":"Shahīdān-e Zeyd","fcode":"PPL","geonameId":33,"lat":32.4666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.8833333,"fcodeName":"populated place","toponymName":"Shīrkeshān","fcl":"P","name":"Shīrkeshān","fcode":"PPL","geonameId":34,"lat":32.0666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.2333333,"fcodeName":"populated place","toponymName":"Shīrīnāb","fcl":"P","name":"Shīrīnāb","fcode":"PPL","geonameId":36,"lat":32.1,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.2,"fcodeName":"populated place","toponymName":"Seyyed Şobhān","fcl":"P","name":"Seyyed Şobhān","fcode":"PPL","geonameId":37,"lat":32.2,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4961,"fcodeName":"populated place","toponymName":"Seyyed Nūr","fcl":"P","name":"Seyyed Nūr","fcode":"PPL","geonameId":38,"lat":32.1367,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"spot, building, farm","countryCode":"IR","lng":48.8514,"fcodeName":"shrine","toponymName":"Seyyed Moḩammad","fcl":"S","name":"Seyyed Moḩammad","fcode":"SHRN","geonameId":39,"lat":32.0443,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.3666667,"fcodeName":"populated place","toponymName":"Seyyed Moḩammad","fcl":"P","name":"Seyyed Moḩammad","fcode":"PPL","geonameId":40,"lat":32.2,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.4833333,"fcodeName":"mountain","toponymName":"Kūh-e Seh Kūh","fcl":"T","name":"Kūh-e Seh Kūh","fcode":"MT","geonameId":41,"lat":32.7166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":49,"fcodeName":"mountain","toponymName":"Kūh-e Satrūn","fcl":"T","name":"Kūh-e Satrūn","fcode":"MT","geonameId":42,"lat":32.45,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.45,"fcodeName":"populated place","toponymName":"Sartal Āqā","fcl":"P","name":"Sartal Āqā","fcode":"PPL","geonameId":43,"lat":32.1333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.4833333,"fcodeName":"mountain","toponymName":"Kūh-e Sarhad","fcl":"T","name":"Kūh-e Sarhad","fcode":"MT","geonameId":44,"lat":32.6333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.6014,"fcodeName":"mountain","toponymName":"Kūh-e Sareh","fcl":"T","name":"Kūh-e Sareh","fcode":"MT","geonameId":45,"lat":32.6719,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.4875,"fcodeName":"populated place","toponymName":"Sar Gach-e Ābezhdān","fcl":"P","name":"Sar Gach-e Ābezhdān","fcode":"PPL","geonameId":47,"lat":32.0763,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.15,"fcodeName":"populated place","toponymName":"Sar Cheshmeh","fcl":"P","name":"Sar Cheshmeh","fcode":"PPL","geonameId":48,"lat":32.1833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.5333333,"fcodeName":"populated place","toponymName":"Sangar-e Soflá","fcl":"P","name":"Sangar-e Soflá","fcode":"PPL","geonameId":49,"lat":32.1333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.5176,"fcodeName":"populated place","toponymName":"Shagar-e Bālā","fcl":"P","name":"Shagar-e Bālā","fcode":"PPL","geonameId":50,"lat":32.1526,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.05,"fcodeName":"populated place","toponymName":"Sandāl","fcl":"P","name":"Sandāl","fcode":"PPL","geonameId":51,"lat":32.1333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.2166667,"fcodeName":"populated place","toponymName":"Sakhī","fcl":"P","name":"Sakhī","fcode":"PPL","geonameId":52,"lat":32.15,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4,"fcodeName":"populated place","toponymName":"Sag Mordeh","fcl":"P","name":"Sag Mordeh","fcode":"PPL","geonameId":53,"lat":32.7333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.85,"fcodeName":"populated place","toponymName":"Sabz Meydān","fcl":"P","name":"Sabz Meydān","fcode":"PPL","geonameId":54,"lat":32.0666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.0833333,"fcodeName":"populated place","toponymName":"Rūkī","fcl":"P","name":"Rūkī","fcode":"PPL","geonameId":55,"lat":32.5333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.25,"fcodeName":"populated place","toponymName":"Razī","fcl":"P","name":"Razī","fcode":"PPL","geonameId":56,"lat":32.1833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"23","fclName":"stream, lake, ...","countryCode":"IR","lng":48.05,"fcodeName":"stream","toponymName":"Raz Āb","fcl":"H","name":"Raz Āb","fcode":"STM","geonameId":57,"lat":32.8,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.4833333,"fcodeName":"mountain","toponymName":"Kūh-e Ratīkū","fcl":"T","name":"Kūh-e Ratīkū","fcode":"MT","geonameId":58,"lat":32.85,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.45,"fcodeName":"mountains","toponymName":"Kūh-e Rītkūh","fcl":"T","name":"Kūh-e Rītkūh","fcode":"MTS","geonameId":59,"lat":32.933333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.1333333,"fcodeName":"populated place","toponymName":"Rāshedī","fcl":"P","name":"Rāshedī","fcode":"PPL","geonameId":60,"lat":32.0166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.0666667,"fcodeName":"populated place","toponymName":"Rasan","fcl":"P","name":"Rasan","fcode":"PPL","geonameId":61,"lat":32.1,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.0025,"fcodeName":"populated place","toponymName":"Raghīveh","fcl":"P","name":"Raghīveh","fcode":"PPL","geonameId":62,"lat":32.1738,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.2,"fcodeName":"populated place","toponymName":"Ramīleh","fcl":"P","name":"Ramīleh","fcode":"PPL","geonameId":63,"lat":32.0666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.2166667,"fcodeName":"populated place","toponymName":"Raḩm Khodā","fcl":"P","name":"Raḩm Khodā","fcode":"PPL","geonameId":64,"lat":32.0166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.2666667,"fcodeName":"populated place","toponymName":"Raḩīmeh","fcl":"P","name":"Raḩīmeh","fcode":"PPL","geonameId":65,"lat":32.0166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.8738,"fcodeName":"populated place","toponymName":"Zīgestān","fcl":"P","name":"Zīgestān","fcode":"PPL","geonameId":67,"lat":32.0752,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.836,"fcodeName":"populated place","toponymName":"Bonah-ye Mehdī","fcl":"P","name":"Bonah-ye Mehdī","fcode":"PPL","geonameId":68,"lat":32.0537,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.15,"fcodeName":"populated place","toponymName":"Qāsem Moţs̄ar","fcl":"P","name":"Qāsem Moţs̄ar","fcode":"PPL","geonameId":69,"lat":32.25,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.1333333,"fcodeName":"populated place","toponymName":"Qalīch","fcl":"P","name":"Qalīch","fcode":"PPL","geonameId":70,"lat":32.3666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.8,"fcodeName":"mountain","toponymName":"Kūh-e Qālī","fcl":"T","name":"Kūh-e Qālī","fcode":"MT","geonameId":71,"lat":32.9666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.366667,"fcodeName":"populated place","toponymName":"Qal‘eh-ye Sheykh","fcl":"P","name":"Qal‘eh-ye Sheykh","fcode":"PPL","geonameId":72,"lat":32.316667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.5464,"fcodeName":"mountain","toponymName":"Kūh-e Pārchehpū","fcl":"T","name":"Kūh-e Pārchehpū","fcode":"MT","geonameId":75,"lat":32.6699,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.2333333,"fcodeName":"populated place","toponymName":"Par Khvājeh","fcl":"P","name":"Par Khvājeh","fcode":"PPL","geonameId":76,"lat":32.15,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.6,"fcodeName":"populated place","toponymName":"Pāpīleh","fcl":"P","name":"Pāpīleh","fcode":"PPL","geonameId":77,"lat":32.3666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.15,"fcodeName":"populated place","toponymName":"Pīr Kāfarān","fcl":"P","name":"Pīr Kāfarān","fcode":"PPL","geonameId":78,"lat":32.2833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"spot, building, farm","countryCode":"IR","lng":49.0412,"fcodeName":"ruin(s)","toponymName":"Pīr ‘Abdollāh","fcl":"S","name":"Pīr ‘Abdollāh","fcode":"RUIN","geonameId":79,"lat":32.2695,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.2666667,"fcodeName":"populated place","toponymName":"Nūrābād","fcl":"P","name":"Nūrābād","fcode":"PPL","geonameId":80,"lat":32.1,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.471908,"fcodeName":"mountain","toponymName":"Kūh-e Nokhvodkār","fcl":"T","name":"Kūh-e Nokhvodkār","fcode":"MT","geonameId":81,"lat":32.706325,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.8,"fcodeName":"populated place","toponymName":"Nofel lo Shatow","fcl":"P","name":"Nofel lo Shatow","fcode":"PPL","geonameId":82,"lat":32.0333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.25,"fcodeName":"populated place","toponymName":"Neypāreh","fcl":"P","name":"Neypāreh","fcode":"PPL","geonameId":83,"lat":32.15,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.9833333,"fcodeName":"mountain","toponymName":"Kūh-e Nesār","fcl":"T","name":"Kūh-e Nesār","fcode":"MT","geonameId":84,"lat":32.4666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.596,"fcodeName":"mountain","toponymName":"Kūh-e Narges Boland","fcl":"T","name":"Kūh-e Narges Boland","fcode":"MT","geonameId":85,"lat":32.7653,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4567,"fcodeName":"populated place","toponymName":"Nardīdū","fcl":"P","name":"Nardīdū","fcode":"PPL","geonameId":86,"lat":32.7838,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.95,"fcodeName":"mountain","toponymName":"Kūh-e Nabpareh","fcl":"T","name":"Kūh-e Nabpareh","fcode":"MT","geonameId":87,"lat":32.3333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4666667,"fcodeName":"populated place","toponymName":"Nīm Mardī","fcl":"P","name":"Nīm Mardī","fcode":"PPL","geonameId":88,"lat":32.85,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"stream, lake, ...","countryCode":"IR","lng":48.15,"fcodeName":"stream","toponymName":"Gelāl-e Mūrt","fcl":"H","name":"Gelāl-e Mūrt","fcode":"STM","geonameId":89,"lat":32.5666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.3166667,"fcodeName":"populated place","toponymName":"Morād Hādī","fcl":"P","name":"Morād Hādī","fcode":"PPL","geonameId":90,"lat":32.1833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":49.4832,"fcodeName":"mountain","toponymName":"Kūh-e Monār","fcl":"T","name":"Kūh-e Monār","fcode":"MT","geonameId":91,"lat":32.5605,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":48.2333333,"fcodeName":"mountain","toponymName":"Kūh-e Molā Qorānī","fcl":"T","name":"Kūh-e Molā Qorānī","fcode":"MT","geonameId":92,"lat":32.75,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.3,"fcodeName":"populated place","toponymName":"Mūdū","fcl":"P","name":"Mūdū","fcode":"PPL","geonameId":93,"lat":32.8,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":49.1,"fcodeName":"populated place","toponymName":"Moḩammadābād","fcl":"P","name":"Moḩammadābād","fcode":"PPL","geonameId":94,"lat":32.3333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.15,"fcodeName":"populated place","toponymName":"Moḩammad Şāfī","fcl":"P","name":"Moḩammad Şāfī","fcode":"PPL","geonameId":95,"lat":32.05,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4833333,"fcodeName":"populated place","toponymName":"Moḩammad Ḩoseyn","fcl":"P","name":"Moḩammad Ḩoseyn","fcode":"PPL","geonameId":96,"lat":32.7833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.233333,"fcodeName":"populated place","toponymName":"Mo‘ezzī-ye Soflá","fcl":"P","name":"Mo‘ezzī-ye Soflá","fcode":"PPL","geonameId":97,"lat":32.316667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"stream, lake, ...","countryCode":"IR","lng":48.584837,"fcodeName":"stream","toponymName":"Rūdkhāneh-ye Māzū","fcl":"H","name":"Rūdkhāneh-ye Māzū","fcode":"STM","geonameId":98,"lat":32.728279,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.95,"fcodeName":"populated place","toponymName":"Māzeh Garqash","fcl":"P","name":"Māzeh Garqash","fcode":"PPL","geonameId":99,"lat":32.0333333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.25,"fcodeName":"populated place","toponymName":"Maz‘al Bandeh","fcl":"P","name":"Maz‘al Bandeh","fcode":"PPL","geonameId":100,"lat":32.016667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"23","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":49.35,"fcodeName":"mountain","toponymName":"Kūh-e Matīkān","fcl":"T","name":"Kūh-e Matīkān","fcode":"MT","geonameId":101,"lat":32.9166667,"adminName1":"Lorestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.4666667,"fcodeName":"populated place","toponymName":"Mashhadī Moḩammad","fcl":"P","name":"Mashhadī Moḩammad","fcode":"PPL","geonameId":102,"lat":32.3,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.55,"fcodeName":"populated place","toponymName":"Marbān","fcl":"P","name":"Marbān","fcode":"PPL","geonameId":103,"lat":32.1166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.7,"fcodeName":"populated place","toponymName":"Mālşafar-e Gharbī","fcl":"P","name":"Mālşafar-e Gharbī","fcode":"PPL","geonameId":105,"lat":32.1833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.15,"fcodeName":"populated place","toponymName":"Malḩad","fcl":"P","name":"Malḩad","fcode":"PPL","geonameId":106,"lat":32.2833333,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"mountain,hill,rock,... ","countryCode":"IR","lng":49.3833333,"fcodeName":"mountain","toponymName":"Kūh-e Makūk","fcl":"T","name":"Kūh-e Makūk","fcode":"MT","geonameId":107,"lat":32.6666667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.7166667,"fcodeName":"populated place","toponymName":"Makīneh","fcl":"P","name":"Makīneh","fcode":"PPL","geonameId":108,"lat":32.1166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.5833333,"fcodeName":"populated place","toponymName":"Maks̄īr","fcl":"P","name":"Maks̄īr","fcode":"PPL","geonameId":109,"lat":32.0166667,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.25,"fcodeName":"populated place","toponymName":"Majīd Javī","fcl":"P","name":"Majīd Javī","fcode":"PPL","geonameId":110,"lat":32.1,"adminName1":"Khūzestān","population":0},{"countryName":"Iran","adminCode1":"15","fclName":"city, village,...","countryCode":"IR","lng":48.233333,"fcodeName":"populated place","toponymName":"Majīd ‘Abdollāh","fcl":"P","name":"Majīd ‘Abdollāh","fcode":"PPL","geonameId":111,"lat":32.133333,"adminName1":"Khūzestān","population":0}]}';
		echo '<pre>';
		print_r(json_decode($str));
	}
	
	function unser() {
		$str = 'a:9:{s:10:"session_id";s:32:"525d014e32a91b814bc1c047976e5243";s:10:"ip_address";s:3:"::1";s:10:"user_agent";s:72:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0";s:13:"last_activity";i:1353067478;s:9:"user_data";s:0:"";s:3:"uid";s:1:"2";s:8:"username";s:12:"zhangqianxun";s:4:"ucid";s:1:"2";s:4:"name";s:9:"장천순";}';
		echo '<pre>';
		print_r(unserialize($str));
	}
	
	function test_cookie() {
		$array = array('process' => 'scheduler', 'progress' => 80);
		set_json_cookie('hello', $array);
	}
	
	function send_js() {
		ob_start();
		echo str_repeat(' ', 1024);
		for($i = 0; $i < 70; $i++) {
			echo
				"<html><script type='text/javascript' language='javascript'>" .
				"document.write(" . $i . ");" .
				"</script></html>";
			ob_flush();
			flush();
		
			usleep(300000);
		}
	}
}